<%--
  Created by IntelliJ IDEA.
  User: 季
  Date: 2024/8/16
  Time: 14:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script>
    $(function () {
        $(".content:odd").css("background", "lightgreen")
    })

</script>
<body>
<table id="tb" style="height: 400px;width: 600px;text-align: center"  align="center">
    <caption><h2>空气质量监测信息库</h2></caption>
    <tr>
        <td colspan="6" align="right">
            <a href="/toAddAir.do">添加空气质量信息</a>
        </td>
    </tr>
    <tr style="background: #468fa9">
        <th style="width: 60px">序号</th>
        <th>区域</th>
        <th>检测时间</th>
        <th>pm10数据</th>
        <th>pm2.5</th>
        <th>监测站</th>
        <th width="80px"></th>
    </tr>
    <c:forEach items="${list}" var="a">
        <tr class="content">
            <td>${a.id}</td>
            <td>${a.district.name}</td>
            <td>${a.monitor_time}</td>
            <td>${a.pmten}</td>
            <td>${a.pmtwo}</td>
            <td>${a.monitoring_station}</td>
            <th><a href="/deleteAir.do?id=${a.id}">删除</a></th>
        </tr>
    </c:forEach>
    <tr>
        <td  align="center"><a href="getAirByPage.do?currPage=1">首页</a></td>
        <td  align="center"><a href="getAirByPage.do?currPage=${currPage-1}"><< 上一页</a></td>
        <td  align="center"><a href="getAirByPage.do?currPage=${currPage+1}">下一页 >></a></td>
        <td  align="center"><a href="getAirByPage.do?currPage=${totalPage}">尾页</a></td>
        <td colspan="3">当前${currPage}总页数${totalPage}总记录数${count}</td>
    </tr>
</table>


</body>
</html>
